package com.weigang.test.domain.entity;

import com.weigang.util.FieldUtil;
import com.siperian.sif.message.Field;
import com.siperian.sif.message.Record;

/**
 * @author Wi Gang
 * @date 2022-09-22 17:41:31
 *
 */
public class BankUserInfoOrclVo{

        
    private String ID = "ID";
        
    private String NAME = "NAME";
        
    private String ADDRESS = "ADDRESS";
        
    private String TEL = "TEL";
        
    private String EMAIL = "EMAIL";
        
    private String IDNUMBER = "IDNUMBER";

    private Record record;

    public static String DATA_OBJECT_UID = "BASE_OBJECT.C_MATERIAL"; // PACKAGE.PKG_WS_HOTEL_PREFERENCE

    private int firstRecord;

    private int recordsToReturn;

    public BankUserInfoOrclVo (){
        this.record = new Record();
        this.record.setSiperianObjectUid(DATA_OBJECT_UID);
    }

    public BankUserInfoOrclVo (Record record){
        this.record = record;
        this.record.setSiperianObjectUid(DATA_OBJECT_UID);
    }


    public String getId () {
        Field field = record.getField(ID);
        return FieldUtil.getFieldStringValue(field);
    }

    public void setId (String ID) {
        if (record.getField(ID) == null) {
            record.setField(new Field(ID));
        }
        record.getField(ID).setStringValue(ID);
    }
    public String getName () {
        Field field = record.getField(NAME);
        return FieldUtil.getFieldStringValue(field);
    }

    public void setName (String NAME) {
        if (record.getField(NAME) == null) {
            record.setField(new Field(NAME));
        }
        record.getField(NAME).setStringValue(NAME);
    }
    public String getAddress () {
        Field field = record.getField(ADDRESS);
        return FieldUtil.getFieldStringValue(field);
    }

    public void setAddress (String ADDRESS) {
        if (record.getField(ADDRESS) == null) {
            record.setField(new Field(ADDRESS));
        }
        record.getField(ADDRESS).setStringValue(ADDRESS);
    }
    public String getTel () {
        Field field = record.getField(TEL);
        return FieldUtil.getFieldStringValue(field);
    }

    public void setTel (String TEL) {
        if (record.getField(TEL) == null) {
            record.setField(new Field(TEL));
        }
        record.getField(TEL).setStringValue(TEL);
    }
    public String getEmail () {
        Field field = record.getField(EMAIL);
        return FieldUtil.getFieldStringValue(field);
    }

    public void setEmail (String EMAIL) {
        if (record.getField(EMAIL) == null) {
            record.setField(new Field(EMAIL));
        }
        record.getField(EMAIL).setStringValue(EMAIL);
    }
    public String getIdnumber () {
        Field field = record.getField(IDNUMBER);
        return FieldUtil.getFieldStringValue(field);
    }

    public void setIdnumber (String IDNUMBER) {
        if (record.getField(IDNUMBER) == null) {
            record.setField(new Field(IDNUMBER));
        }
        record.getField(IDNUMBER).setStringValue(IDNUMBER);
    }


    public Record toRecord() {
        return record;
    }

    public void setRecord(Record record) {
        this.record = record;
    }

    public int toFirstRecord() {
        return firstRecord;
    }

    public void setFirstRecord(int firstRecord) {
        this.firstRecord = firstRecord;
    }

    public int toRecordsToReturn() {
        return recordsToReturn;
    }

    public void setRecordsToReturn(int recordsToReturn) {
        this.recordsToReturn = recordsToReturn;
    }
}
